package com.wh.system.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@Accessors(chain = true)
public class Menu implements Serializable {

    private Long id;
    //菜单名称
    private String name;
    //    菜单组件路径
    private String component;
    //    路由中当前组件的path
    private String url;
    //    图标
    private String icon;
    //排序索引(index是数据库关键字，所以这里必须自己处理名字)
    @TableField("`index`")
    private Integer index;
    //    父菜单id
    private Long parentId;
    //    简介
    private String intro;
    //    状态
    private int state;

    //父级菜单
    @TableField(exist = false)
    private Menu parent;
    //当前菜单下的子菜单
    @TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Menu> children = new ArrayList<>();

    private String menuType;

    private  String visable;
     private  String perms;

}
